﻿@model Admin.Models.ProductDetailsModel
<script src="~/Scripts/bootstrap-fileupload.js"></script>
@*<script src="~/Scripts/jquery-2.1.4.min.js"></script>
<link rel="stylesheet" href="~/Content/bootstrap.css" />*@




    @{
        ViewBag.Title = "insertProductDetails";
        Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
    }


    @using (Html.BeginForm("insertProductDetails", "ProductDetailsAdmin", FormMethod.Post, new { enctype = "multipart/form-data" }))
    {


        @Html.AntiForgeryToken()

    <div class="formtable" style="float: left; margin-left: 50px;width:800px; margin-top: 20px; text-align: left;">
        <h3>Thêm chi tiết sản phẩm</h3>
        <hr />
        @Html.ValidationSummary(true)
        <dl class="dl-horizontal">



            <dt>Hình sản phẩm</dt>
            <dd>
                <div class="form-horizontal">
                    <div class="form-group">

                        <div class="col-lg-8">
                            <div class="fileupload fileupload-new" data-provides="fileupload">

                                <div class="fileupload-preview fileupload-exists thumbnail" style="max-width: 150px;min-height:100px; line-height: 20px; background-image: url(/Content/images/demoUpload.jpg);z-index:1001;">

                                </div>
                                <div>
                                    <span class="btn btn-file">


                                        <input type="file" value="Select image" name="photo"  />
                                        <b style="color:red;">@ViewBag.Error</b>
                                    </span>

                                </div>
                            </div>
                        </div>
                    </div>
                </div>

            </dd>

            <dt>Tên sản phẩm</dt>
            <dd>
                @Html.EditorFor(model => model.TENSP)
                @Html.ValidationMessageFor(model => model.TENSP)
            </dd>

            <dt>Giá cũ sản phẩm</dt>
            <dd>
                @Html.EditorFor(model => model.GIACU)
                @Html.ValidationMessageFor(model => model.GIACU)
            </dd>

            <dt>Giá mới sản phẩm</dt>
            <dd>
                @Html.EditorFor(model => model.GIAMOI)
                @Html.ValidationMessageFor(model => model.GIAMOI)
            </dd>

            <dt>Khuyến mãi</dt>
            <dd>
                @Html.EditorFor(model => model.SALEOF)
                @Html.ValidationMessageFor(model => model.SALEOF)
            </dd>

            <dt>Chủ đề</dt>
            <dd>
                @Html.EditorFor(model => model.CHUDE)
                @Html.ValidationMessageFor(model => model.CHUDE)
            </dd>

            <dt>Ngày tạo</dt>
            <dd>
                @Html.EditorFor(model => model.NGAYTAO)
                @Html.ValidationMessageFor(model => model.NGAYTAO)
            </dd>

            <dt>Người tạo</dt>
            <dd>
                @Html.EditorFor(model => model.NGUOITAO)
                @Html.ValidationMessageFor(model => model.NGUOITAO)
            </dd>
        </dl>
        <div class="form-group" style="width:600px;">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Save" class="btn btn-default" />
                @Html.ActionLink("Quay lại danh sách", "ProductDetails", "ProductDetailsAdmin")
            </div>

        </div>

    </div>


    }

   